﻿using System;
using Sharp.Domain.PlatformBoundedContext.OrgModule.Aggregates;
using Sharp.Domain.PlatformBoundedContext.PersonModule.Aggregates;
using Sharp.Domain.Repositories;
using Sharp.Infrastructure;

namespace Sharp.Domain.PlatformBoundedContext.OrgModule.Services
{
    public partial class OrgService : IOrgService
    {
        private IRepositoryContext _repositoryContext;
        private IOrgRepository _orgRepository;
        private IOrgLevelRepository _orgLevelRepository;
        private IOrgForBusinessRepository _orgForBusinessRepository;
        private IOrgForBusinessListRepository _orgForBusinessListRepository;

        public OrgService(IRepositoryContext repositoryContext,
            IOrgRepository orgRepository,
            IOrgLevelRepository orgLevelRepository,
            IOrgForBusinessRepository orgForBusinessRepository,
            IOrgForBusinessListRepository orgForBusinessListRepository)
        {
            _repositoryContext = repositoryContext;
            _orgRepository = orgRepository;
            _orgLevelRepository = orgLevelRepository;
            _orgForBusinessRepository = orgForBusinessRepository;
            _orgForBusinessListRepository = orgForBusinessListRepository;
        }

        public Result MoveOrSort(Guid? parentId, Guid[] ids)
        {
            Result res = _orgRepository.MoveOrSort(parentId, ids);

            return res;
        }
    }
}